import ADQ from "../../ADCore/Core/ADQ";
import { DataType } from "../Enums/DataType";
import { DataTypeReader } from "../Enums/DataTypeReader";

/**全局接口 */
export default class GloableApi {
  static post<T>(dataType: DataType, data: any): Promise<T> {
    var url = DataTypeReader.Instance.getApi(dataType);
    return ADQ.Http.post(url, data);
  }
  static get<T>(dataType: DataType, data?: any): Promise<T> {
    var url = DataTypeReader.Instance.getApi(dataType);
    return ADQ.Http.get<T>(url, data);
  }
}
